<template>
    <div>
        <van-nav-bar title="首页" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-search v-model="value" placeholder="搜你所想" />
        <van-tabs v-model:active="active">
            <van-tab title="精选"></van-tab>
            <van-tab title="本地"></van-tab>
            <van-tab title="新车"></van-tab>
            <van-tab title="原创"></van-tab>
            <van-tab title="视频看车"></van-tab>
            <van-tab title="导购"></van-tab>
        </van-tabs>
        <van-swipe :autoplay="3000" lazy-render>
            <van-swipe-item v-for="image in images" :key="image">
                <img :src="image" style="width: 100%;height: 200px;" />
            </van-swipe-item>
        </van-swipe>
        <van-grid :column-num="4">
            <van-grid-item v-for="item in floordata" :icon="item.image_src":text="item.name" />
        </van-grid>
        <span>热门车系 | 热门品牌     更多车系</span>
        <p> 轿车 suv   MPV  新能源</p>
        <h3>华为比亚迪互劵,受伤的是17万的宝马</h3>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import {floordataApi} from '@/api/api'
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
];
let floordata=ref([])
floordataApi().then(res=>{
    console.log('导航数据',res);
    floordata.value=res.data.message
})
</script>

<style lang="scss" scoped></style>